Jump to content

I Just Found Out!!!


Guest Red Ocktober
 Share

Recommended Posts

Guest Red Ocktober

i've gotta run my BlitzMAX standalone apps set with amdministrative priviledges in order for it to run properly... (win Vista of course)...

 

i was having problems getting the lights to work right... probably due to the keys not being present or read right when parsing the loaded scene...

 

i don't know what made me try it, but i ran the app like i have to run the ide... as administrator... all suddenly worked...

 

 

go figure... ;)

 

 

added...

 

i have to do this not only for the standalone exes i make with BlitzMAX... but i also had to set engine.exe to run under admin privileges in order to get my lua scripted examples to run correctly...

 

ya gotta love Vista... :)

 

 

--Mike

Link to comment
Share on other sites

If you want to run your programs without Administrator account, you can put them under c:\users\username, which should be queried using the %userprofile% environment variable.

As far I know, this is the only directory where the user can write files on Vista and Windows 7. It's similar in Linux, where the user has write access only to /home/username.

 

This is needed when you publish your game, since most people don't want to risk their computer by running as Administrator.

I don't know how commercial games do it, that they can write under "C:\Program Files (x86)\", at least in the installation phase they might ask for the Administrator password, but how they can write after that, must be some trick with native Windows API calls (where they grant the user write access to the directory). Actually there is also a DOS command to do that, if I remember right, so your installer might use that if you don't want to hardcode Windows API functions in your program.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

since most people don't want to risk their computer by running as Administrator.

 

That's true for a linux user, but not for your typical windows user. If people weren't running their regular accounts with admin privileges, UAC would probably never have been born. There just seems to be something in the transition of becoming a linux user that makes you realise the potential danger of running with elevated privileges. Of course, not every windows user is guilty here, but the vast majority.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Guest Red Ocktober

also... copying the exe folder to /users/username didn't change anything... i still need to enable admin privileges at the new location...

 

 

--Mike

Link to comment
Share on other sites

  • 3 weeks later...

If you want to run your programs without Administrator account, you can put them under c:\users\username, which should be queried using the %userprofile% environment variable.

As far I know, this is the only directory where the user can write files on Vista and Windows 7. It's similar in Linux, where the user has write access only to /home/username.

 

This is needed when you publish your game, since most people don't want to risk their computer by running as Administrator.

I don't know how commercial games do it, that they can write under "C:\Program Files (x86)\", at least in the installation phase they might ask for the Administrator password, but how they can write after that, must be some trick with native Windows API calls (where they grant the user write access to the directory). Actually there is also a DOS command to do that, if I remember right, so your installer might use that if you don't want to hardcode Windows API functions in your program.

 

I believe this is why most games now save profile information in My Documents, actually some have done that for quite a while, but it seems more widely used now. Apps like Adobe and IonCube do this, as well as a lot of the new games I have played.

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...